Skip to main content

ApiObject

Introduction

Every event function receives the yeet API object as its first argument.
This object contains all functions and constructors you need to interact with yeet elements.

UI

The following functions are available in the UI group:

getObject()

getObject(id, type, sourceConfigType?, sourceConfigId?) => yeetRuntimeObject

Create a new RuntimeObject by specifying the unique ID and the component type. If a component is supposed to be used outside of the active main container, you must also specify the ID and component type of the main container.

NameTypeDescription
idnumberComponent ID general > meta > componentId
typestringComponent type general > meta > componentType
sourceConfigType (optional)stringMain container type general > meta > componentType
sourceConfigId (optional)idMain container ID general > meta > componentId

As a return value, you receive the matching yeetRuntimeObject.

instanceid

Returns the current instanceId of a component inside a yTemplateList. The default value is -1.

Types

Constructors for creating complex property values.

colorValue

Creates a color value from a hex string.

  • transparent
  • #FFF
  • #FFFFFF
  • #FF00FFFF

All input values are stored in the hex8 property as #RRGGBBAA (hex8 color).

class ColorValue {
hex8 : string
constructor(hexString)
}

columnValue

To create a custom table column.

class columnValue {

field: StringProperty;
type: StringProperty;
nullable: BooleanProperty;
displayEditDialog: StringProperty;
displayTable: StringProperty;
sort: StringProperty;
filter: BooleanProperty;
label: StringProperty;
name: StringProperty;
visible: BooleanProperty;
sticky: BooleanProperty;
orderId: NumberProperty;
userCreated: BooleanProperty;

bodyCell__minWidth: UnitNumberProperty | undefined;
bodyCell__maxWidth: UnitNumberProperty | undefined;
bodyCell__fontAlignHorizontal: StringProperty | undefined;
bodyCell__fontAlignVertical: StringProperty | undefined;
bodyCell__bgColor: ColorProperty | undefined;
bodyCell__fontSize: UnitNumberProperty | undefined;
bodyCell__fontWeight: NumberProperty | undefined;
bodyCell__fontColor: ColorProperty | undefined;

columnHeader__fontAlignHorizontal: StringProperty | undefined;
columnHeader__fontAlignVertical: StringProperty | undefined;
columnHeader__bgColor: ColorProperty | undefined;
columnHeader__fontSize: UnitNumberProperty | undefined;
columnHeader__fontWeight: NumberProperty | undefined;
columnHeader__fontColor: ColorProperty | undefined;

constructor(
field = "NoField"
type = "string",
nullable = false,
displayEditDialog = "y-input",
displayTable = "text",
sort = "none",
filter = true,
label = "NoLabel",
visible = true,
orderId = -1,
userCreated = false

bodyCell__minWidth: UnitNumberValue | undefined = undefined,
bodyCell__maxWidth: UnitNumberValue | undefined = undefined,
bodyCell__fontAlignHorizontal: String | undefined = undefined,
bodyCell__fontAlignVertical: String | undefined = undefined,

columnHeader__fontAlignHorizontal: String | undefined = undefined,
columnHeader__fontAlignVertical: String | undefined = undefined,
columnHeader__bgColor: ColorValue | undefined = undefined,
bodyCell__bgColor: ColorValue | undefined = undefined,
sticky = false,

columnHeader__fontSize: UnitNumberValue | undefined = undefined,
columnHeader__fontWeight: NumberValue | undefined = undefined,
bodyCell__fontSize: UnitNumberValue | undefined = undefined,
bodyCell__fontWeight: Number | undefined = undefined,
columnHeader__fontColor: ColorValue | undefined = undefined,
bodyCell__fontColor: ColorValue | undefined = undefined
);
}
NameTypeDescription
fieldStringEntity property name
typeStringEntity property type
nullableBooleanWhether null is a valid value
displayEditDialogStringControl how the value gets displayed for edit
displayTableStringControls how the values get visualized in table
sortStringColumn sort
filterBooleanShow filter options
labelStringColumn label
nameStringUniqe column name
visibleBooleanHide column
stickyBooleanSticky Column(always visible)
orderIdNumberOrder position
userCreatedBooleanIndicates whether the column was created by a user
bodyCell__minWidthUnitNumberValue | undefinedOverrides column min width
bodyCell__maxWidthUnitNumberValue | undefinedOverrides column max width
bodyCell__fontAlignHorizontalString | undefinedOverrides hoizontal content alignment
bodyCell__fontAlignVerticalString | undefinedOverrides vertical content alignment
bodyCell__bgColorColorValue | undefinedOverrides column background color
bodyCell__fontSizeUnitNumberValue | undefinedOverrides column font size
bodyCell__fontWeightNumberValue | undefinedOverrides column font weight
bodyCell__fontColorColorValue | undefinedOverrides column font color
columnHeader__fontAlignHorizontalString | undefinedOverrides columnheader hoizontal content alignment
columnHeader__fontAlignVerticalString | undefinedOverrides columnheader vertical content alignment
columnHeader__bgColorColorValue | undefinedOverrides columnheader background color
columnHeader__fontSizeUnitNumberValue | undefinedOverrides columnheader font size
columnHeader__fontWeightNumber | undefinedOverrides columnheader font weight
columnHeader__fontColorColorValue | undefinedOverrides columnheader font color

OptionListValue

Represents a single option in a selection/list.

class OptionListValue {
value: string;
label: string;
icon?: string;
tooltip?: string;
constructor();
constructor(initValue: string);
constructor(initValue: string, initLabel: string);
constructor(initValue: string, initLabel: string, initIcon: string);
constructor(initValue: string, initLabel: string, initIcon?: string, initToolTip?: string);
constructor(initValue?: string, initLabel?: string, initIcon?: string, initToolTip?: string);
}
NameTypeDescription
valueStringOption value
labelStringDisplay value
icon (optional)StringIcon name
tooltip (optional)StringTooltip text

UnitNumberValue

Represents a numeric value with a unit (for example 16px or 2rem). Value and unit can be provided separately or as a single string.

export class UnitNumberValue {
value: number;
unit: string;

constructor();
constructor(value: string);
constructor(value: number);
constructor(value: number, unit: string);
constructor(value: number | string = 0, unit = "px");

cssValue() => string;
}
NameTypeDescription
valueNumberNumber value
unitStringUnittype
cssValue()FunctionReturn a string used for css classes

EntityPropertyListEntry

Represents a selected entity property for data modelling.

class EntityPropertyListEntry {
propertyName: string;
dataType: string;
propertyType: string;
navigationProperty: string;
nullable: boolean;

constructor();
constructor(
propertyName: string,
dataType: string,
propertyType: string,
navigationProperty: string
);
constructor(
propertyName: string,
dataType: string,
propertyType: string,
navigationProperty: string,
nullable: boolean
);
constructor(
propertyName?: string,
dataType?: string,
propertyType?: string,
navigationProperty?: string,
nullable?: boolean
);

isEqual(otherEntry: EntityPropertyListEntry): boolean;
}
NameTypeDescription
propertyNameStringString value
dataTypeStringCertain data type for property, e.g. Int64, Date, Number, ...
propertyTypeStringString value, e.g. navigation, basic, ...
navigationPropertyStringString value representing the connected property
nullableBooleanBoolean value

MarkerValue

Represents a position marker on a map.

class MarkerValue {
latitude: number;
longitude: number;
label?: string;
icon?: string;
tooltip?: string;

constructor(latitude = 0, longitude = 0, label = "", icon = "", tooltip = "");
}

NameTypeDescription
latitudeNumberNumber value
longitudeNumberNumber value
label (optional)StringString value
icon (optional)StringString value
tooltip (optional)StringString value

TrackValue

Represents a media track (for example subtitles) for audio or video.

class TrackValue {
kind: string;
label: string;
language: string;
source: string;

constructor(kind = "subtitles", label = "English", language = "en", source = "");
}
NameTypeDescription
kindStringString value, e.g. subtitles
labelStringString value
languageStringString value
sourceStringString value

DivToPdfOptions

Options for rendering containers to PDF.

class DivToPdfOptions {
format?: PdfFormat;
marginMillimeter?: number;
dpi?: number;
orientation?: "p" | "l";
fitMode?: FitMode;
center?: boolean;

constructor(
format = "a4",
marginMillimeter = 0,
dpi = 96,
orientation?: "p" | "l",
fitMode?: FitMode,
center?: boolean
);
}
NameTypeDescription
format (optional)StringString value, e.g. 'a4', 'letter' or [width,height] in pt
marginMillimeter (optional)NumberNumber value
dpi (optional)NumberNumber value
orientation (optional)String"p" or "l"
fitMode (optional)StringString value, e.g. "contain", "width", ...
center (optional)BooleanBoolean value

ElementReference

References a yeet component.

class ElementReference {
elementId: number;
elementType: string;

constructor(elementId = -1, elementType = "y-component");
}
NameTypeDescription
elementIdNumberNumber value
elementTypeStringString value

System

Helpers for navigation, PDF export, media access, email, location, speech, user metadata and actions.

navigateTo(location, external) => void

Navigates to a page inside or outside your application.

NameTypeDescription
locationStringRoute or URL of the target page
externalBooleantrue if the router should redirect to an external URL

printToPdf()

printToPdf(targets, sourceConfigType, sourceConfigId, filename, options, returnBytesInsteadOfSaving) => string[] | undefined

Combines one or more container elements and renders them as a PDF.

NameTypeDescription
targetsElementReference[]A list of elements to be combined as a pdf
sourceConfigTypeStringString value
sourceConfigIdNumberNumber value
filenameStringString value
optionsDivToPdfOptionsOptions to be provided to customize pdf parameters
returnBytesInsteadOfSavingBooleanBoolean value to control whether to download or to return bytes

As a return value, you receive an array of bytes if returnBytesInsteadOfSaving is set to true.

Media

Helpers for interacting with the built-in Media Manager.

downloadFile()

downloadFile(path, fileName, downloadName) => void

Downloads a file from the Media Manager.

NameTypeDescription
pathStringFolder path where the file is stored in the Media Manager
fileNameStringFile name under which it is stored in the folder
downloadName (optional)StringName under which the file should be downloaded by the browser

uploadFile()

uploadFile(path, showNotify) => void

Opens a file dialog and uploads a file to the Media Manager.

NameTypeDescription
pathStringFolder path where the file should be stored
showNotify (optional)BooleanShows a notification on success or failure if true

deleteFile()

deleteFile(path, name, showNotify) => void

Deletes a file in the Media Manager.

NameTypeDescription
pathStringFolder path where the file is stored
nameStringFile name under which it is stored in the folder
showNotify (optional)BooleanShows a notification on success or failure if true

updateFile()

updateFile(path, name, value showNotify) => void

Replaces the content of an existing file in the Media Manager.

NameTypeDescription
pathStringFolder path where the file is stored
valueStringNew file content as a base64 string
nameStringFile name under which it is stored in the folder
showNotify (optional)BooleanShows a notification on success or failure if true

loadFileData()

loadFileData(path, fileName, binary) => string | undefined

Reads the content of a file from the Media Manager.

NameTypeDescription
pathStringFolder path where the file is stored
fileNameStringFile name under which it is stored in the folder
binary (optional)BooleanIf true, returns binary data instead of a base64 string

As a return value, you receive a base64 string or a binary value, depending on the binary flag.

uploadFileData()

uploadFileData(path, content, fileName, mimeType, showNotify) => void

Uploads a file to the Media Manager using raw bytes.

NameTypeDescription
pathStringFolder path where the file should be stored
contentUint8ArrayFile content as Uint8Array
fileNameStringFile name under which it should be stored in the folder
mimeTypeStringMIME type, e.g. image/png
showNotify (optional)BooleanShows a notification on success or failure if true

createDirectory()

createDirectory(directoryName, showNotify) => void

Creates a new folder in the Media Manager.

NameTypeDescription
directoryNameStringName of the folder
showNotify (optional)BooleanShows a notification on success or failure if true

deleteDirectory()

deleteDirectory(name, showNotify) => void

Deletes a folder in the Media Manager.

NameTypeDescription
nameStringName of the folder to delete
showNotifyBooleanShows a notification on success or failure if true

Email

Helpers fro sending emails.

sendUserMail()

sendUserMail(mailData, showNotify) => void

Sends an email using the configured mail settings.

NameTypeDescription
mailDatayODataSendUserMailDataObject containing all relevant information for sending the email
showNotifyBooleanShows a notification on success or failure if true

Location

Helpers for location-based information.

getGeoLocation()

getGeoLocation() => void

Requests the current geolocation and returns it as an object.

Information:

For this function to work, the user must allow location access in the browser.

Speech

Helpers for text-to-speech.

loadVoices()

loadVoices() => void

Loads all available system voices.

Warning:

Call this function once before using any other speech function to ensure voices are available.

getVoices()

getVoices() => SpeechSynthesisVoice[]

Returns all loaded voices.

speak()

speak(text, lang) => void

Speaks the given text using the selected language.

NameTypeDescription
textStringText to be spoken
langStringLanguage code, e.g. "de", "en"

pause()

pause() => void

Pauses the current speech output.

resume()

resume() => void

Resumes the current speech output.

cancel()

cancel() => void

Cancels the current speech output.

User

Metadata for the logged-in user.

NameTypeDescription
namestringUsername of the logged-in user.
rolestringRole of the user.
tokenstring(Currently not supported)
refreshTokenstring(Currently not supported)

Actions

Create()

create(rpcName, actionName) => yeetActionObject

If you want to execute a C16 function on the yeetCore, you can create an action object with the create() method. The action object will then be internally registered and can be queried by the action name. You can then execute the function, control the status, or query the result through the action object.

NameTypeDescription
rpcNamestringC16 action name
actionName (optional)stringIf no actionName is provided, the action is registered under the rpcName.

As a return value, you will receive your yeetActionObject.

Delete()

delete(actionName) => void

If you want to delete an yeetActionObject, you can unregister the yeetActionObject using the action name.

NameTypeDescription
actionNamestringRegistered action name

There is no return value.

Get()

get(actionName) => yeetActionObject

Once you have registered an yeetActionObject, you can retrieve it at any time using the action name.

NameTypeDescription
actionNamestringRegistered action name

As a return value, you will receive your yeetActionObject.

Clipboards

ClipboardEntityDelete()

ClipboardEntityDelete(ClipboardId) => void

Deletes an entity entry via the Clipboard. The Clipboard deletes the record whose RecordID is stored under the Keys group as _id.

warning

To execute this command, the Clipboard must have "use Entity" enabled and all required entity properties must be configured.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

There is no return value.

ClipboardEntityUpdate()

ClipboardEntityUpdate(ClipboardId) => void

Updates an entity entry via the Clipboard. The Clipboard updates the record with the RecordID stored under the Keys group as \_id. The values of the Clipboard properties are transferred to the entity properties. For this to work, the Clipboard property names must match the entity property names.

To automatically generate Clipboard properties from an entity, enable AutoProperties for the entity properties in the Clipboard configuration.

The Clipboard must have "use Entity" enabled and all required entity properties must be specified.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

There is no return value.

ClipboardEntityRead()

ClipboardEntityRead(ClipboardId) => void

Loads an entity entry into the Clipboard. The Clipboard reads the record whose RecordID is stored under the Keys group as _id. The loaded data is written to the matching Clipboard properties. Once all values are set, an update is sent to all components that are listening to this Clipboard via SourceLink.

The Clipboard must have "use Entity" enabled and all required entity properties must be specified.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

There is no return value.

ClipboardUpdate()

ClipboardUpdate(ClipboardId, value) => void

Updates multiple Clipboard properties at once using a JavaScript object. Each key corresponds to a Clipboard property name, and the value is the new property value.

{
property1: "text",
property2: 2
}

After the update, a change notification is sent to all components listening to the Clipboard via SourceLinks.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.
valueFrontEndyeetODataTypesJavascript-Object that describes every updated Clipboardproperty

There is no return value.

ClipboardRead()

ClipboardRead(ClipboardId) => Promise<FrontEndyeetODataTypes>

Reads all properties from a Clipboard.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

As a return value, you receive a Promise that resolves to a FrontEndyeetODataTypes object.

setEntityKeys()

setEntityKeys(ClipboardId, keyName, keyValue) => void

Sets the entity key for the Clipboard. With the yeet database, you typically only need to set the _id property. Future OData sources may allow multiple entity keys.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.
keyNamestringName of the entity key property
keyValuenumberNew value of the entity key property

There is no return value.

getEntityKeys()

getEntityKeys(ClipboardId) => Promise<FrontEndyeetODataTypes>

Returns the current entity keys of the Clipboard (for example the _id of the active record).

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

As a return value, you receive a Promise that resolves to a FrontEndyeetODataTypes object.

propertyUpdate()

propertyUpdate(ClipboardId, propertyName, value) => void

Updates a single Clipboard property.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.
propertyNamestringClipboard-Property-Name
valuestring, numberNeuer Propertywert

There is no return value.

propertyRead()

propertyRead(ClipboardId, propertyName) => void

Reads the value of a single Clipboard property.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.
propertyNamestringClipboard property name

As a return value, you receive a Promise that resolves to a string or number.

Helpers for interacting with yPopup.

popupClose()

popupClose(popupId) => void

Closes a yPopup by its ID.

NameTypeDescription
popupIdnumberComponentID of the yPopup generic > meta > componentId

There is no return value.

popupOpen()

popupOpen(popupId, componentType, componentId, parentType, parentId) => void

Opens a popup and positions it relative to a specific component. You pass:

  • the popup to open and

  • the component (and its main container) that should act as the positioning reference.

NameTypeDescription
popupIdnumberComponent ID of the yPopup generic > meta > componentId
componentTypestringComponent type from which it was opened.
componentIdnumberComponent ID from which it was opened.
parentTypestringMainContainer type from which it was opened.
parentidnumberMainContainer id from which it was opened.

There is no return value.

OData

odataEntityCreate()

odataEntityCreate(entityName, entityValue, baseUrl?) => Promise<yODataResponse<unknown>>

You can use odataEntityCreate to create a new entity entry using JavaScript.

NameTypeDescription
entityNamestringName of the entity in the database
entityValueFrontEndyeetODataTypesObject containing data for the entity properties
baseUrl (optional)stringURL to another yeet database (not yet supported)

As a return value, you will receive a Promise which returns the newly created entity entry. Since the ID is automatically assigned, you can directly retrieve the RecordID of your new entry.

odataEntityDelete()

odataEntityDelete(entityName: string, entityKeyPropertyValues: FrontEndyeetODataTypes, baseUrl?: string | undefined) => Promise<yODataResponse<unknown>>

To delete an entity entry, you need to provide an object that contains all the entity keys and their corresponding values. In the yeet database, there is always only one entity key (_id), which is the record related id.

NameTypeDescription
entityNamestringName of the entity in the database
entityKeyPropertyValuesFrontEndyeetODataTypesObject containing all the entity key values of the entry to be deleted
baseUrl (optional)stringURL to another yeet database (not yet supported)

As a return value, you receive a promise that returns an empty string upon completion.

odataEntityRead()

odataEntityRead(entityName, query, entityKeyValues, baseUrl?) => Promise<yODataResponse<unknown>>

To read an entity entry, you can pass a yODataQuery object to retrieve a list of entity entries, or you can select a specific entry using entityKeyValues. In the yeet database, there is always only one entity key(_id), which is the record related id.

NameTypeDescription
entityNamestringName of the entity in the database
queryyODataQuery | undefinedObject with various options to load a list of entities
entityKeyValuesFrontEndyeetODataTypesObject containing all entity key values of the entity entry to be read
baseUrl (optional)stringURL to another yeet database (not yet supported)

As a return value, you will receive a promise that is filled with an array containing all queried entity entries.

odataEntityUpdate()

odataEntityUpdate(entityName, entityValue, entityKeyPropertyValues, baseUrl?) => Promise<>

To update an entity entry, you can provide an object to specify the entries that are supposed to be updated. You also need to provide the entityKeyPropertyValues object to determine which entity entry should be modified. In the yeet database, there is always only one entity key (_id), which is the record related ID.

NameTypeDescription
entityNamestringName of the entity in the database
entityValueFrontEndyeetODataTypesObject containing new values for the entity properties
entityKeyPropertyValuesFrontEndyeetODataTypesObject containing all the entity key values of the entity entry to be modified
baseUrl (optional)stringURL to another yeet database (not yet supported)

The return value is a promise without a return value.

odataMetaData()

odataMetaData(baseUrl?) => Promise<yODataMetadata>

The metadata of the database can be retrieved using odataMetaData.

NameTypeDescription
baseUrl (optional)stringURL to another yeet database (not yet supported)

As a return value, you will receive a promise that returns a MetadataObject. You can find all entities, enums, and actions here.

Objecttypes

yODataQuery

Optional query properties.

let queryOptions = {
$filter?: string;
$select?: string[];
$skip?: number;
$top?: number;
}
NameTypeDescription
$filter (optional)StringOdata filter string
$select (optional)String[]Which entity properties should be loaded
$skip (optional)NumberHow many entries to skip
$top (optional)NumberHow many entity records to load

yODataSendUserMailData

Query properties to provide for sending an email via yeet.

let queryOptions = {
userName: string;
path: string;
template: string;
attachementInfos: string;
placeholderValues: string;
recipientAddress: string;
recipientName: string;
subject: string;
}

// for example
{
path: "tutorialFolder",
template: "myTemplate.html",
placeholderValues: "{'yeet:Salutation': 'Greetings', 'yeet:FirstName': 'Ash', 'yeet:LastName': 'Ketchum', 'yeet:RegistrationUrl': 'www.google.com', 'yeet:AdminName': 'Max Mustermann'}",
attachmentInfos: "[{'FileName': 'mh2.png', 'Path': 'tutorialFolder', 'Content': ''}]",
recipientAddress: "ash.ketchum@gmail.com",
recipientName: "Ask Ketchum",
subject: "Complete your registration!",
userName: "testUser"
}
NameTypeDescription
userNameStringUser defined in your appsettings.json
pathStringThe path where to find the html template to use for the mail
templateStringThe name of the actual template file
attachementInfosStringAn array of objects, each representing an individual attachment
placeholderValuesStringA stringified object of key value pairs for placeholders
recipientAddressStringString value
recipientNameStringString value
subjectStringString value

PropertyValueTypes

type PropertyValueTypes =
| string
| number
| boolean
| UnitNumberValue
| ColorValue
| ValidatorListValue[]
| OptionListValue[]
| ColumnValue[];

FrontEndyeetODataTypes

interface FrontEndyeetODataTypes {
[key: string]: FrontEndyeetODataType;
}

FrontEndyeetODataType

type Front FrontEndyeetODataType =
string | number | boolean | null

yeetRuntimeObject

This object represent a component config.

class yeetRuntimeObject {
get(category, group, property) => Propertytypes;
set(category, group, property) => void;
property(category, group, property) => yeetRuntimeProperty;
reset(category, group, property) => void;
}

Get()

get(category, group, property) => Propertytype;
NameTypeDescription
categorystringPropertycategory
groupstringPropertygroup
propertystringPropertyname

As a return value, you will receive the property value.

Set()

set(category, group, property, value) => void;
NameTypeDescription
categorystringPropertycategory
groupstringPropertygroup
propertystringPropertyname
valuePropertyValuetypesNew property value

There is no return value.

Property()

Creates a yeetRuntimeProperty. With this, you can directly set the property without having to specify the property path.

property(category, group, property) => yeetRuntimeProperty;
NameTypeDescription
categorystringProperty category
groupstringProperty group
propertystringProperty name

As a return value, you will receive the yeetRuntimeProperty.

Reset()

Indicates that the property should be set by the theme again.

info

Not all properties can be set by a theme.

reset(category, group, property) => void;
NameTypeDescription
categorystringProperty category
groupstringProperty group
propertystringProperty name

There is no return value.

yeetRuntimeProperty

This object represent a component property.

class yeetRuntimeObjectProperty {
get()=>PropertyValueTypes;
set(value: PropertyValueTypes)=>void;
reset()=>void;
}

Get()

Gets the value of the property.

get() => PropertyValueTypes;

As a** return value**, you receive a PropertyValueType object.

Set()

Sets the value of the property.

set(value) => PropertyValueTypes;
NameTypeDescription
valuePropertyValueTypesneues Value für die Property

There is no return value.

Reset()

Indicates that the property should be set again by the theme.

info

Not all properties can be set by a theme.

reset() => void;

There is no return value.